package com.wac.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author beta
 * @since 2023-03-16
 */
@Getter
@Setter
@TableName("dynamic")
public class Dynamic implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private String id;

	@TableField("user_id")
	private String userId;

	@TableField("content")
	private String content;

	@TableField("image_url")
	private String imageUrl;

	@TableField("`time`")
	private LocalDateTime time;

	@TableField("view")
	private int view;

	//联表查询的其他字段
	@TableField(exist = false)
	private User user;

	@TableField(exist = false)
	private int likeNum;

	@TableField(exist = false)
	private int commentNum;

	//是否点赞
	@TableField(exist = false)
	private int isLike;

}
